<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>CRM</title>

<script type="text/javascript" src="js/jquery-easyui-1.5.4.2/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-easyui-1.5.4.2/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="js/jquery-easyui-1.5.4.2/jquery.easyui.min.js"></script>
<link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.5.4.2/themes/icon.css"/>
<link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.5.4.2/themes/black/easyui.css"/>
<script type="text/javascript">

$(function(){
	var addTab = function(title, href){
		if($("#tt").tabs("exists", title)){
			//存在
			$("#tt").tabs("select", title);
		}else{
			//不存在
			$("#tt").tabs("add", {
				title: title,
				href: href,
				closable: true
			});
		}
	}
	
	$(".add").linkbutton({onClick:function(){
		var title = $(this).linkbutton("options").text;
		var href = $(this).linkbutton("options").href2;
		addTab(title, href);
	}});
});	
</script>
<style>
	.items{
		list-style: none;
		padding:0px;
		margin:0px;
	}
</style>
</head>

<body class="easyui-layout">
	<div data-options="region:'north'"  style="height: 100px;"></div>
	<div data-options="region:'south'"  style="height: 50px;"></div>
	
	<div data-options="region:'west',title:'主菜单',split:true"
		style="width:200px;">
		
		<div id="aa" class="easyui-accordion"
			data-options="fit:true,border:false"
			style="width: 300px; height: 200px;">
			<div title="Title1" data-options="iconCls:'icon-more'"
				style="overflow: auto; padding: 10px;">
				<ul class="items">
				<li><a class="easyui-linkbutton add" data-options="plain:true,iconCls:'icon-large-chart',href2:'topro',text:'产品表'"></a></li>
				<li><a class="easyui-linkbutton add" data-options="plain:true,iconCls:'icon-large-shapes',href2:'toinve',text:'库存表'"></a></li>
				</ul>
				</div>
				<div title="Title2"></div>
		</div>
		
	</div>
<div data-options="region:'center'">
<div id="tt" class="easyui-tabs" data-options="fit:true,boder:false,href:'test'"style="width:500px;height:250px;">
</div>

</div>
</body>
</html>